<?php

/*

Move Topic (admin_move_topic.php)

*/

$page_title = "Move Topic";
$rank_check = 4;
include "header.inc.php";

if ($what == "move")
{
	mysql_query("UPDATE forum_subjects2 SET category=$move_to WHERE id = '$move' AND game = '$game'");
	die(header(error("forums.php?game=$game","The topic has been moved!")));
}

print "$openHTML";

$findCategories = mysql_query("SELECT id,cat_name FROM forum_cats2 WHERE game = '$game'");
while ($getCats = mysql_fetch_array($findCategories))
{
	$catList .= "<option value=$getCats[id]>$getCats[cat_name]";
}

$message = fetch("SELECT message FROM forum_topics2 WHERE id = '$id' AND game = '$game'");
$subject = fetch("SELECT subject FROM forum_subjects2 WHERE id = '$id' AND game = '$game'");

$switch = "<input type=hidden name=what value=move><input type=hidden name=move value=$id>";

$message[message] = strip_tags($message[message]);

print "

<style type=\"text/css\">.header {font-family:Charcoal; font-size:10px; color:#$topAndBottomBG; border-style:dotted; border-width:3px; background-color:transparent; width: 300; align:center}</STYLE>

<center><p class=header align=center><b>$subject[subject]</b><br>$message[message]</p></center>";

echo "<form action=admin_move_topic.php?game=$game method=post><p align=center>What category do you want to move this topic to?<br><select name=move_to>$catList$switch</select>
<input type=submit value=\"Move Topic\"></p></form>";

print "$closeHTML";
?>